Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: update visual tests to use fixed browser window height #8405

Merged
merged 11 commits into from
Dec 30, 2024

Conversation

web-padawan
Copy link
Member

Description

Added a custom WTR command to emulate missing setViewport() (adding that requires upgrading WebdriverIO to the new major version and I couldn't get it done quickly) and to avoid changing screenshot size when bumping Chrome version.

Type of change

  • Test

@web-padawan
Copy link
Member Author

There's 1px difference in SauceLabs (apparently there's some rounding involved). I'll close the PR for now.

@web-padawan web-padawan reopened this Dec 30, 2024
@web-padawan web-padawan force-pushed the test/visual-tests-window-height branch from 70ebbba to 530a2d7 Compare December 30, 2024 10:45
@web-padawan
Copy link
Member Author

UPD: looks like we need to call setWindowSize() multiple times in order to get the stable viewport size, this is how the webdriverio v4 implementation was working, and also how this workaround works. Let's see if tests pass now.

@web-padawan web-padawan marked this pull request as ready for review December 30, 2024 10:48
@web-padawan web-padawan force-pushed the test/visual-tests-window-height branch from 4eb52bb to 124b7f5 Compare December 30, 2024 13:46
@web-padawan
Copy link
Member Author

Updated screenshots for all components that use the document body (dialog, overlay, login, notification etc).

@web-padawan web-padawan merged commit 702b27a into main Dec 30, 2024
9 checks passed
@web-padawan web-padawan deleted the test/visual-tests-window-height branch December 30, 2024 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants